package com.aisile.teacher.feign;

import com.aisile.model.student.pojos.Student;
import com.aisile.model.base.vos.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Auther:yry
 * @Date:2024/6/25 0025
 * @VERSON:1.0
 */
@FeignClient("bld-stduent")
public interface StudentFeign {

    // 都是feign使用的接口  对我们来讲  与前端交互的接口 需要统一返回给是  与后端交互的接口（feing） 怎么方便怎么来
    @PostMapping("/student/saves/{teacherId}")
    public R saveStudents(@PathVariable("teacherId") Integer teacherId, @RequestBody List<Student> list);

    @DeleteMapping("/student/del/{id}")
    public R deleteStudentsbyTid(@PathVariable("id") Integer id);

    @GetMapping("/student/getOne")
    public List<Student> getStudentByTid(@RequestParam("id") Integer id);

}
